home *** CD-ROM | disk | FTP | other *** search
/ Best of Shareware / Best of PC Windows Shareware 1.0 - Wayzata Technology (7111) (1993).iso / mac / WINDOWS / EDUCATON / UPT / UPT1.EXE / DEBUG.TXT < prev    next >
Text File  |  1992-08-27  |  28KB  |  694 lines

  1.  
  2.              Ultimate Power Tips 1.0A (c) 1992  Scanlon Enterprises
  3.  
  4.         ────────────────────────────────────────────────────────────────
  5.  
  6.                             ROLL YOUR OWN UTILITIES
  7.  
  8.         ────────────────────────────────────────────────────────────────
  9.  
  10.  
  11.  
  12.         Roll Your Own Utilities is a section devoted to users who what 
  13.         the most from their system (Pushing to the Max). You don't have 
  14.         to be a Power User to use these utilities, nor to even make 
  15.         them. Everything you need, to create the utilities described 
  16.         here, come with DOS.
  17.  
  18.         You'll need :
  19.  
  20.         1) DOS DEBUG.EXE (or DEBUG.COM)
  21.  
  22.         2) DOS EDLIN.COM (or any good text editor)
  23.  
  24.         3) Some free disk space
  25.  
  26.         The DOS DEBUG program, is very well known in Power User Circles, 
  27.         and amongst programmers. Now, it is time, for everyone else to 
  28.         learn the potential of this FREE program, that is included with 
  29.         all Microsoft DOS.
  30.  
  31.         DEBUG is a tool designed for aiding the programmer in debugging 
  32.         their software. Because Microsoft designed more into it, it is 
  33.         often used as a compiler! Yes, you can write a program in 
  34.         assembly language, and compile it, without even going out and 
  35.         buying a compiler. Actually, since we are talking about assembly 
  36.         language, this technique is called Assembling, instead of 
  37.         compiling. After making your first utility, from this section, 
  38.         you may call yourself a programmer! Not only that, you can say, 
  39.         that you've programmed in Assembly Language, the hardest of all 
  40.         programming languages!
  41.  
  42.         The purpose of this section, is NOT to provide you with detailed 
  43.         workings of DEBUG, as powerful as it may be, but to provide you 
  44.         with enough knowledge to create the utilities here-in.
  45.  
  46.         To create these utilities, you'll be using a command line (DOS 
  47.         prompt) similar to the following :
  48.  
  49.                 DEBUG < filename
  50.  
  51.         Where, 'filename' is the name of the file we tell you to create 
  52.         using a text editor (or EDLIN). The redirector is used, because 
  53.         we are going to pretend we are entering the keystrokes found in 
  54.         the file 'filename'. Actually, we have, but, we have done so, in 
  55.         advance. The redirector tells DOS, to get keyboard input from 
  56.         the file 'filename', instead of the actual keyboard.
  57.  
  58.         Let us begin, now, with our first program!
  59.  
  60.         Get Available Memory Quickly
  61.  
  62.  
  63.         Name this script file (that's what we call a file we use to 
  64.         execute DEBUG automatically), FM.SCR (for FreeMemory).
  65.  
  66.         FM.SCR
  67.  
  68.  
  69.                 N FM.COM
  70.                 E 100 EB 09 90 4B 20
  71.                 E 105 46 72 65 65 24
  72.                 E 10A 0A 2E A1 02 00
  73.                 E 10F 8C CB 2B C3 B1
  74.                 E 114 06 D3 E8 B9 01
  75.                 E 119 00 F6 36 0A 01
  76.                 E 11E 50 0A C0 74 05
  77.                 E 123 32 E4 41 EB F2
  78.                 E 128 58 8A D4 80 C2
  79.                 E 12D 30 B4 02 CD 21
  80.                 E 132 E2 F4 B4 09 BA
  81.                 E 137 03 01 CD 21 C3
  82.                 RCX
  83.                 3C
  84.                 W
  85.                 Q
  86.  
  87.         If you copied this correctly, you will have created your first 
  88.         DEBUG script file. You may be wondering what all those alpha 
  89.         characters are doing mixed in with the numbers (if you are a 
  90.         programmer or power user, you already know)? We are using what 
  91.         is referred to as HEX numbers, which is a numbering system based 
  92.         upon 16, rather that our usual base 10 (digits 0-9). For the 
  93.         program to work, a complete understanding, is NOT necessary.
  94.  
  95.         This little script, will create a program, FM.COM, which, when 
  96.         executed, will display the amount of available memory. By 
  97.         creating this program, you will no longer have to execute the 
  98.         DOS program CHKDSK to get the memory available. For those of you 
  99.         with newer DOS 5.0, you have the DOS program MEM which reports 
  100.         this value. However, the DOS MEM program is NOT only 60 bytes! 
  101.         Yes, we did say 60 bytes. The DOS MEM program is almost 40K 
  102.         bytes! Throw out that disk hog, and use FM!
  103.  
  104.         Well, we have the script, but, how do we make the program? Easy, 
  105.         just enter the following line :
  106.  
  107.                 DEBUG<FM.SCR
  108.  
  109.         When executed, as above, your display should have the following 
  110.         lines displayed.
  111.  
  112.                 CXC000003 01 CD 21 C3
  113.                 Writing 0003C bytes
  114.                 -Q
  115.         If your screen differs from the above, recheck the script file, 
  116.         you created, with the earlier text (above) in this tutorial.
  117.  
  118.         If you are having problems, or simply want to save yourself time 
  119.         and frustration of typing in the above script, simply load this 
  120.         tutorial section into your word processor, which must have 
  121.         blocking capability. Block the actual script section of this 
  122.         tutorial, and save the block as FM.SCR! Now, you won't even have 
  123.         to type, and, you won't get an error!
  124.  
  125.         Now, when you want to know the amount of available ram, you 
  126.         simply enter "FM" and press <ENTER> at any DOS prompt. For those 
  127.         of you who do have DOS 5.0 and the program MEM, and have noticed 
  128.         a discrepancy in available size reporting, remember, MEM is 
  129.         reporting BYTES FREE, and FM is reporting K (thousands) of bytes 
  130.         free! To verify that FM is indeed reporting accurately, simply 
  131.         divide the reported amount by MEM, by 1024, to get K bytes as 
  132.         reported by FM. You'll see, these numbers are the same!
  133.  
  134.  
  135.  
  136.         Num Lock Off
  137.  
  138.         If you are using one of those 84 key (old time keyboards), or 
  139.         simply prefer to use cursor positioning from the numeric keypad, 
  140.         and want to make sure that your NumLock is Off at boot time, 
  141.         create the following DEBUG script file. We will name the script 
  142.         file "NN.SCR" for no num lock, which will make the program 
  143.         "NN.COM".
  144.  
  145.         NN.SCR
  146.  
  147.                 A 100
  148.                 MOV AX,0
  149.                 MOV DS,AX
  150.                 AND BYTE PTR[417],DF
  151.                 INT 20
  152.                 {empty line}
  153.                 RCX
  154.                 C
  155.                 N NN.COM
  156.                 W
  157.                 Q
  158.  
  159.         Be sure to leave the line with "{empty line}", blank. Just press 
  160.         the <ENTER> key for that line. We use "NN", as the name, for No 
  161.         Num Lock.
  162.  
  163.         Now, from a DOS prompt, type : DEBUG<NN.SCR
  164.  
  165.         You should see the following display after typing the above.
  166.  
  167.  
  168.                 CXC00000C INT 20TEXPTR[417],DF
  169.                 WritingO0000C bytes
  170.                 -Q
  171.  
  172.         If your screen differs from the above, recheck the script file, 
  173.         you created, with the earlier text (above) in this tutorial.
  174.  
  175.         Now, all you have to do is enter NN <ENTER> at a DOS prompt to 
  176.         set num lock off. The best use, is to put NN on a line of your 
  177.         AUTOEXEC.BAT file, and have AUTOEXEC automatically set num lock 
  178.         off at boot time.
  179.  
  180.         If you are having problems, or simply want to save yourself time 
  181.         and frustration of typing in the above script, simply load this 
  182.         tutorial section into your word processor, which must have 
  183.         blocking capability. Block the actual script section of this 
  184.         tutorial, and save the block as FM.SCR! Now, you won't even have 
  185.         to type, and, you won't get an error! This will be the last time 
  186.         we mention using your word processor to extract the script files 
  187.         from this tutorial. Just remember, you can do this with any of 
  188.         the script files which are listed here-in.
  189.  
  190.         Whoa! Notice the difference between this script and our earlier 
  191.         one? The first example, was using hex input, and here, we use, 
  192.         what is called assembly language. The difference between these 
  193.         two approaches, is invisible to you, the user. This tutorial, 
  194.         will intermix the two types of script files, Hex and Assembly, 
  195.         so you will become familiar with them. In this way, you'll be 
  196.         able to quickly enter them, from a magazine article.
  197.  
  198.  
  199.  
  200.  
  201.  
  202.         Lets take a moment, to cover two DEBUG script lines, the "RCX" 
  203.         and "N". The line containing "RCX" tells DEBUG, that we wish to 
  204.         set the number of bytes, for a file size, in this case, "C", 
  205.         next line, which is 12 decimal. Thus, we will have created a COM 
  206.         file (NN.COM), which is only 12 bytes long!
  207.  
  208.  
  209.  
  210.         Faster Repeat Keys
  211.  
  212.         This script file, will create a program to speed up repeat keys. 
  213.         Repeat keys, are keys which can be held down, and automatically 
  214.         duplicate characters. IE...Hold down the letter "k", soon, the 
  215.         screen will start filling up with "k". Now release the "k" key, 
  216.         and "k"'s stop appearing. The speed at which the k's appear, is 
  217.         called the repeat rate, which is what this program will speed 
  218.         up. We will call this script file FK.SCR, and it will make a 
  219.         program called FK.COM (for Fast Keys).
  220.  
  221.         FK.SCR
  222.  
  223.                 A 100
  224.                 MOV AX,305
  225.                 MOV BX,3
  226.                 INT 16
  227.                 INT 20
  228.                 {blank line}
  229.                 RCX
  230.                 A
  231.                 N FK.COM
  232.                 W
  233.                 Q
  234.  
  235.         Now, type : DEBUG<FK.SCR
  236.  
  237.         If your script file is right, you'll see the following displayed
  238.  
  239.  
  240.                 CXC00000A INT 20,305
  241.                 WritingO0000A bytes
  242.                 -Q
  243.         If your screen differs, then you have entered the script file 
  244.         incorrectly. If everything goes right, you can now enter FK and 
  245.         press <ENTER> at any DOS prompt, to speed up your key board 
  246.         repeat keys. However, to automatically, have this performed at 
  247.         boot time would be better. To do this, just place a line, with 
  248.         FK into your AUTOEXEC.BAT file, and from then on, each time you 
  249.         boot, you'll have the repeat keys speeded up.
  250.  
  251.  
  252.  
  253.         Lost Cursor Recovery
  254.  
  255.         If you, like me, have had your cursor become invisible after 
  256.         executing some program, would like some way to get it back, then 
  257.         enter this script. This script will create a program, that not 
  258.         only recovers the cursor, but will restore a screen from 
  259.         graphics mode, which some games leave it in.
  260.  
  261.  
  262.  
  263.  
  264.  
  265.         The following script is named RC.SCR, for Recover Cursor, and 
  266.         creates a program called "RC.COM".
  267.  
  268.         RC.SCR
  269.  
  270.                 A 100
  271.                 MOV AX,3
  272.                 INT 10
  273.                 INT 20
  274.                 {Blank line}
  275.                 RCX
  276.                 7
  277.                 N RC.COM
  278.                 W
  279.                 Q
  280.  
  281.         This creates the smallest program yet, only 7 bytes! Now, to 
  282.         use, simply enter RC and press <ENTER> from a DOS prompt. No 
  283.         need to have this as part of your AUTOEXEC, unless your AUTOEXEC 
  284.         starts something which leaves the screen in graphics mode. To 
  285.         get the best use of this utility, we suggest creating a batch 
  286.         file to start your game or application which leaves the screen 
  287.         in graphics mode, or makes the cursor invisible. If your program 
  288.         is named "GO.EXE" then your batch file would look like this.
  289.  
  290.                 GO
  291.                 RC
  292.  
  293.         Just a simple two line batch file! 
  294.  
  295.         For those of you familiar with programming, you'll notice, the 
  296.         code sets attempts to reset the mode to MODE 3, which is 80 
  297.         column by 25 line color mode. We haven't made an error, do NOT 
  298.         change anything. If you have a monochrome system, this will 
  299.         reset that back to monochrome mode! Go ahead and try it.
  300.  
  301.  
  302.  
  303.         Comparing The Size of Two Files
  304.  
  305.         Have you ever needed to compare the size of two different files? 
  306.         This script file will create a program which will do just that. 
  307.         The program, once created, will display the size difference 
  308.         between two files. Create the script file FD.SCR (for File 
  309.         Difference), which then can be used, with DEBUG to create 
  310.         FD.COM.
  311.  
  312.  
  313.  
  314.  
  315.  
  316.         FD.SCR
  317.                 N FD.COM
  318.                 E 100 EB 5F 90 00 00 00 00 00
  319.                 E 108 00 00 00 53 79 6E 74 61
  320.                 E 110 78 3A 20 46 44 20 66 69
  321.                 E 118 6C 65 31 20 66 69 6C 65
  322.                 E 120 32 0D 0A 24 00 00 00 00
  323.                 E 128 00 00 46 69 6C 65 20 4E
  324.                 E 130 4F 54 20 66 6F 75 6E 64
  325.                 E 138 20 6F 72 20 46 69 6C 65
  326.                 E 140 20 4F 70 65 6E 20 45 72
  327.                 E 148 72 6F 72 0D 0A 24 44 69
  328.                 E 150 66 20 3A 20 24 24 20 42
  329.                 E 158 79 74 65 73 0D 0A 24 00
  330.                 E 160 00 FC BE 81 00 E8 AC 00
  331.                 E 168 73 0C B4 09 BA 0B 01 CD
  332.                 E 170 21 B8 02 4C CD 21 89 36
  333.                 E 178 03 01 FF 0E 03 01 E8 86
  334.                 E 180 00 72 E7 C6 44 FF 00 E8
  335.                 E 188 8A 00 72 DE 89 36 05 01
  336.                 E 190 FF 0E 05 01 E8 70 00 73
  337.                 E 198 06 80 7C FF 0D 75 CB C6
  338.                 E 1A0 44 FF 00 8B 16 03 01 E8
  339.                 E 1A8 77 00 73 07 B4 09 BA 2A
  340.                 E 1B0 01 EB BC A3 07 01 89 16
  341.                 E 1B8 09 01 8B 16 05 01 E8 60
  342.                 E 1C0 00 72 E9 8B 1E 07 01 8B
  343.                 E 1C8 0E 09 01 3B CA 77 0E 72
  344.                 E 1D0 04 3B D8 73 08 93 86 CA
  345.                 E 1D8 C6 06 54 01 2D 2B D8 1B
  346.                 E 1E0 CA 53 51 B4 09 BA 4E 01
  347.                 E 1E8 CD 21 E8 4D 00 B4 09 BA
  348.                 E 1F0 56 01 CD 21 59 5B B8 00
  349.                 E 1F8 4C 0B DB 75 06 0B C9 75
  350.                 E 200 02 CD 21 B0 01 CD 21 AC
  351.                 E 208 3C 20 74 06 3C 0D 75 F7
  352.                 E 210 F9 C3 F8 C3 AC 3C 20 74
  353.                 E 218 FB 3C 0D 75 02 F9 C3 F8
  354.                 E 220 C3 B8 00 3D CD 21 72 11
  355.                 E 228 8B D8 B8 02 42 2B C9 2B
  356.                 E 230 D2 CD 21 50 B4 3E CD 21
  357.                 E 238 58 C3 8B D1 8B C3 FF 06
  358.                 E 240 5F 01 8B DA 2B C9 2B D2
  359.                 E 248 2B F6 BF 0A 00 E8 18 00
  360.                 E 250 53 0B C0 75 E9 0B D2 75
  361.                 E 258 E5 8B 0E 5F 01 5A 80 C2
  362.                 E 260 30 B4 02 CD 21 E2 F6 C3
  363.                 E 268 8B E9 B9 20 00 F8 D1 D0
  364.                 E 270 D1 D3 D1 D5 D1 D2 73 0A
  365.                 E 278 2B EF 1B D6 F9 E2 EF EB
  366.                 E 280 0E 90 3B D6 72 06 75 F0
  367.                 E 288 3B EF 73 EC F8 E2 DF D1
  368.                 E 290 D0 D1 D3 8B CD 87 D3 87
  369.                 E 298 CB C3
  370.                 RCX
  371.                 19A
  372.                 W
  373.                 Q
  374.  
  375.         This DEBUG script file, is fairly lengthy, as script files goes, 
  376.         so please be careful when entering it. Should you have problems, 
  377.         we strongly suggest you use a wordprocessor to extract the above 
  378.         and use the resultant file with DEBUG directly with DEBUG. If 
  379.         you have entered the above correctly, and execute the command 
  380.         "DEBUG<FD.SCR" you'll see the following display.
  381.  
  382.  
  383.  
  384.                 -N FD.COM
  385.                 -E 100 EB 5F 90 00 00 00 00 00
  386.                 -E 108 00 00 00 53 79 6E 74 61
  387.                 -E 110 78 3A 20 46 44 20 66 69
  388.                 -E 118 6C 65 31 20 66 69 6C 65
  389.                 -E 120 32 0D 0A 24 00 00 00 00
  390.                 -E 128 00 00 46 69 6C 65 20 4E
  391.                 -E 130 4F 54 20 66 6F 75 6E 64
  392.                 -E 138 20 6F 72 20 46 69 6C 65
  393.                 -E 140 20 4F 70 65 6E 20 45 72
  394.                 -E 148 72 6F 72 0D 0A 24 44 69
  395.                 -E 150 66 20 3A 20 24 24 20 42
  396.                 -E 158 79 74 65 73 0D 0A 24 00
  397.                 -E 160 00 FC BE 81 00 E8 AC 00
  398.                 -E 168 73 0C B4 09 BA 0B 01 CD
  399.                 -E 170 21 B8 02 4C CD 21 89 36
  400.                 -E 178 03 01 FF 0E 03 01 E8 86
  401.                 -E 180 00 72 E7 C6 44 FF 00 E8
  402.                 -E 188 8A 00 72 DE 89 36 05 01
  403.                 -E 190 FF 0E 05 01 E8 70 00 73
  404.                 -E 198 06 80 7C FF 0D 75 CB C6
  405.                 -E 1A0 44 FF 00 8B 16 03 01 E8
  406.                 -E 1A8 77 00 73 07 B4 09 BA 2A
  407.                 -E 1B0 01 EB BC A3 07 01 89 16
  408.                 -E 1B8 09 01 8B 16 05 01 E8 60
  409.                 -E 1C0 00 72 E9 8B 1E 07 01 8B
  410.                 -E 1C8 0E 09 01 3B CA 77 0E 72
  411.                 -E 1D0 04 3B D8 73 08 93 86 CA
  412.                 -E 1D8 C6 06 54 01 2D 2B D8 1B
  413.                 -E 1E0 CA 53 51 B4 09 BA 4E 01
  414.                 -E 1E8 CD 21 E8 4D 00 B4 09 BA
  415.                 -E 1F0 56 01 CD 21 59 5B B8 00
  416.                 -E 1F8 4C 0B DB 75 06 0B C9 75
  417.                 -E 200 02 CD 21 B0 01 CD 21 AC
  418.                 -E 208 3C 20 74 06 3C 0D 75 F7
  419.                 -E 210 F9 C3 F8 C3 AC 3C 20 74
  420.                 -E 218 FB 3C 0D 75 02 F9 C3 F8
  421.                 -E 220 C3 B8 00 3D CD 21 72 11
  422.                 -E 228 8B D8 B8 02 42 2B C9 2B
  423.                 -E 230 D2 CD 21 50 B4 3E CD 21
  424.                 -E 238 58 C3 8B D1 8B C3 FF 06
  425.                 -E 240 5F 01 8B DA 2B C9 2B D2
  426.                 -E 248 2B F6 BF 0A 00 E8 18 00
  427.                 -E 250 53 0B C0 75 E9 0B D2 75
  428.                 -E 258 E5 8B 0E 5F 01 5A 80 C2
  429.                 -E 260 30 B4 02 CD 21 E2 F6 C3
  430.                 -E 268 8B E9 B9 20 00 F8 D1 D0
  431.                 -E 270 D1 D3 D1 D5 D1 D2 73 0A
  432.                 -E 278 2B EF 1B D6 F9 E2 EF EB
  433.                 -E 280 0E 90 3B D6 72 06 75 F0
  434.                 -E 288 3B EF 73 EC F8 E2 DF D1
  435.                 -E 290 D0 D1 D3 8B CD 87 D3 87
  436.                 -E 298 CB C3
  437.                 -RCX
  438.                 CX 0000
  439.                 :19A
  440.                 -W
  441.                 Writing 0019A bytes
  442.                 -Q
  443.  
  444.         After executing DEBUG with the script file, you are now ready to 
  445.         use FD.COM. To use, enter :
  446.  
  447.                 FD file1 file2
  448.  
  449.  
  450.         This will display the file size difference between 'file1' and 
  451.         'file2'. If 'file1' is larger than 'file2' the difference is 
  452.         displayed as a positive value. If 'file1' is smaller than 
  453.         'file2' then the difference is displayed as a negative number. 
  454.         In addition, the program will set an ERRORLEVEL which can be 
  455.         tested from a batch file. The ERRORLEVEL will be "0" if the 
  456.         files are exactly the same size, "1" if the files are not the 
  457.         same size, and "2" if there is an error, such as file not found 
  458.         or can't be read.
  459.  
  460.  
  461.  
  462.         Combining the DOS Environment, With Keyboard Input
  463.  
  464.         Sometimes, it is important to ask questions in a batch file, 
  465.         but, DOS doesn't have any batch file keyboard input, except the 
  466.         almost useless PAUSE command which waits for any key. PAUSE does 
  467.         nothing with the keystroke! This script file, IN.SCR, will 
  468.         create IN.COM.
  469.  
  470.         IN.SCR
  471.                 N IN.COM
  472.                 E 100 FC B4 0E B3 0F BE 81 00
  473.                 E 108 AC 3C 20 74 FB 3C 0D 74
  474.                 E 110 05 CD 10 AC EB F7 33 C9
  475.                 E 118 BF 80 00 32 E4 CD 16 0A
  476.                 E 120 C0 74 3D B4 0E 3C 08 74
  477.                 E 128 42 3C 0D 74 13 3C 03 74
  478.                 E 130 2A 3C 20 72 E6 83 F9 7F
  479.                 E 138 74 2A AA 41 CD 10 EB DB
  480.                 E 140 CD 10 B0 0A CD 10 B4 09
  481.                 E 148 BA 7B 01 CD 21 B4 02 E3
  482.                 E 150 0A BE 80 00 AC 86 D0 CD
  483.                 E 158 21 E2 F9 B8 00 4C CD 21
  484.                 E 160 0A E4 74 F7 B8 07 0E CD
  485.                 E 168 10 EB B0 E3 F7 B0 08 CD
  486.                 E 170 10 B0 20 CD 10 49 4F B0
  487.                 E 178 08 EB C1 53 45 54 20 41
  488.                 E 180 53 4B 3D 24 90 90 90 90
  489.                 RCX
  490.                 84
  491.                 W
  492.                 Q
  493.  
  494.         If you have entered the above correctly, and execute the 
  495.         following command : DEBUG<IN.SCR  you will see the following 
  496.         screen displayed.
  497.  
  498.                 CXC000053 4B 3D 24 90 90 90 90
  499.                 Writing 00084 bytes
  500.                 -Q
  501.         Now, you are ready to use IN.COM. This program will allow a user 
  502.         to enter a string of text, such as a name, password, etc... To 
  503.         use this program, you must use the DOS redirector, to force the 
  504.         output of IN, to a file. When this is done, you'll end up with a 
  505.         one line file like this :
  506.  
  507.                 SET ASK=input
  508.  
  509.         Where 'input' is what the user entered.
  510.  
  511.  
  512.  
  513.  
  514.  
  515.         For instance, you want to ask the user their name, you'd create 
  516.         a batch file with these lines :
  517.  
  518.                 IN What is your name ? > NAME.BAT
  519.                 CALL NAME.BAT
  520.                 ECHO Why Hello %ASK%!
  521.  
  522.         The first line passes a question to our new program IN.COM, 
  523.         which sends its output to the file NAME.BAT, via the redirector 
  524.         ">". If the user responds with "Jeff" to the question, then the 
  525.         batch file "NAME.BAT" will contain "SET ASK=Jeff". The second 
  526.         line of the batch file, under DOS 3.3 and up, calls the new 
  527.         batch file just created from the first line. This batch file, 
  528.         executes the one line, "SET ASK=Jeff", which places "Jeff" into 
  529.         the environment variable ASK. Now, the final line can display 
  530.         the result, by embedding the variable name ASK inside "%" 
  531.         characters. This is how a batch file uses an environment 
  532.         variable. The variable name will be replaced by the contents of 
  533.         the variable, "Jeff". Thus our screen would display :
  534.  
  535.                 Why Hello Jeff!
  536.  
  537.         And NOT : Why Hello %ASK%!
  538.  
  539.         By using this program, your batch files can add that personal 
  540.         touch. Other uses, of course, include password input, selecting 
  541.         a directory name, and almost anything you can think of, which 
  542.         requires a line of input.
  543.  
  544.  
  545.  
  546.         The Forgotten Rename Feature
  547.  
  548.         DOS forgot one important function, Directory Rename. This 
  549.         function is suitable for DOS 3.0 and up. If you have an earlier 
  550.         DOS, why NOT upgrade NOW! We'll call our final script file 
  551.         "DR.SCR" for Directory Rename, which will create "DR.COM" when 
  552.         used with DEBUG.
  553.  
  554.  
  555.  
  556.  
  557.  
  558.         DR.SCR
  559.  
  560.                 N DR.COM
  561.                 E 100 E9 86 00 00 52 65 71 75
  562.                 E 108 69 72 65 73 20 44 4F 53
  563.                 E 110 20 33 2E 30 20 61 6E 64
  564.                 E 118 20 75 70 0D 0A 24 00 55
  565.                 E 120 73 61 67 65 20 3A 20 52
  566.                 E 128 44 20 5B 64 3A 5D 5B 70
  567.                 E 130 61 74 68 5D 6F 72 67 6E
  568.                 E 138 61 6D 65 20 6E 65 77 6E
  569.                 E 140 61 6D 65 0D 0A 24 00 00
  570.                 E 148 00 00 20 69 73 20 4E 4F
  571.                 E 150 54 20 61 20 64 69 72 65
  572.                 E 158 63 74 6F 72 79 0D 0A 24
  573.                 E 160 00 00 00 44 69 72 65 63
  574.                 E 168 74 6F 72 79 20 4E 4F 54
  575.                 E 170 20 66 6F 75 6E 64 20 6F
  576.                 E 178 72 20 49 4E 56 41 4C 49
  577.                 E 180 44 20 70 61 74 68 0D 0A
  578.                 E 188 24 B8 00 30 CD 21 3C 03
  579.                 E 190 73 0C BA 0E 01 B4 09 CD
  580.                 E 198 21 B8 01 4C CD 21 BE 81
  581.                 E 1A0 00 FC E8 5B 00 73 05 BA
  582.                 E 1A8 1F 01 EB E9 89 F2 4A E8
  583.                 E 1B0 41 00 72 F3 C6 44 FF 00
  584.                 E 1B8 89 F3 E8 43 00 72 E8 EE
  585.                 E 1C0 FE 4F E8 2E 00 73 06 80
  586.                 E 1C8 7C FF 0D 75 DA C6 44 FF
  587.                 E 1D0 00 B8 00 43 CD 21 F7 C1
  588.                 E 1D8 10 00 75 0D C6 47 FF 24
  589.                 E 1E0 B4 09 CD 21 BA 4A 01 EB
  590.                 E 1E8 AC B4 56 CD 21 BA 63 01
  591.                 E 1F0 72 A3 C3 AC 3C 20 74 06
  592.                 E 1F8 3C 0D 75 F7 F9 C3 F8 C3
  593.                 E 200 AC 3C 20 74 FB 3C 00 75
  594.                 E 208 02 F9 C3 F8 C3 90 90 90
  595.                 RCX
  596.                 10D
  597.                 W
  598.                 Q
  599.  
  600.         Again, using DEBUG, enter the following command.
  601.  
  602.                 DEBUG<DR.SCR
  603.  
  604.  
  605.  
  606.  
  607.  
  608.         You should see the following screen displayed
  609.  
  610.                 -N DR.COM
  611.                 -E 100 E9 86 00 00 52 65 71 75
  612.                 -E 108 69 72 65 73 20 44 4F 53
  613.                 -E 110 20 33 2E 30 20 61 6E 64
  614.                 -E 118 20 75 70 0D 0A 24 00 55
  615.                 -E 120 73 61 67 65 20 3A 20 52
  616.                 -E 128 44 20 5B 64 3A 5D 5B 70
  617.                 -E 130 61 74 68 5D 6F 72 67 6E
  618.                 -E 138 61 6D 65 20 6E 65 77 6E
  619.                 -E 140 61 6D 65 0D 0A 24 00 00
  620.                 -E 148 00 00 20 69 73 20 4E 4F
  621.                 -E 150 54 20 61 20 64 69 72 65
  622.                 -E 158 63 74 6F 72 79 0D 0A 24
  623.                 -E 160 00 00 00 44 69 72 65 63
  624.                 -E 168 74 6F 72 79 20 4E 4F 54
  625.                 -E 170 20 66 6F 75 6E 64 20 6F
  626.                 -E 178 72 20 49 4E 56 41 4C 49
  627.                 -E 180 44 20 70 61 74 68 0D 0A
  628.                 -E 188 24 B8 00 30 CD 21 3C 03
  629.                 -E 190 73 0C BA 0E 01 B4 09 CD
  630.                 -E 198 21 B8 01 4C CD 21 BE 81
  631.                 -E 1A0 00 FC E8 5B 00 73 05 BA
  632.                 -E 1A8 1F 01 EB E9 89 F2 4A E8
  633.                 -E 1B0 41 00 72 F3 C6 44 FF 00
  634.                 -E 1B8 89 F3 E8 43 00 72 E8 EE
  635.                 -E 1C0 FE 4F E8 2E 00 73 06 80
  636.                 -E 1C8 7C FF 0D 75 DA C6 44 FF
  637.                 -E 1D0 00 B8 00 43 CD 21 F7 C1
  638.                 -E 1D8 10 00 75 0D C6 47 FF 24
  639.                 -E 1E0 B4 09 CD 21 BA 4A 01 EB
  640.                 -E 1E8 AC B4 56 CD 21 BA 63 01
  641.                 -E 1F0 72 A3 C3 AC 3C 20 74 06
  642.                 -E 1F8 3C 0D 75 F7 F9 C3 F8 C3
  643.                 -E 200 AC 3C 20 74 FB 3C 00 75
  644.                 -E 208 02 F9 C3 F8 C3 90 90 90
  645.                 -RCX
  646.                 CX 0000
  647.                 :10D
  648.                 -W
  649.                 Writing 0010D bytes
  650.                 -Q
  651.  
  652.         Don't forget, this program you created requires DOS 3.0 and 
  653.         later. Now that we have this utility, we can start renaming 
  654.         directories. To use DR.COM you enter a command line similar to 
  655.         the following :
  656.  
  657.                 DR olddir newdir
  658.  
  659.         Where 'olddir' is the current directory name, including drive 
  660.         and path, 'newdir' is the new name to call it.
  661.  
  662.         EXAMPLE: If you have a directory called BUG and want to rename 
  663.         it BUGGED, you enter :
  664.  
  665.                 DR BUG BUGGED
  666.  
  667.         And, if your directory is D:\FILES\HOPE and you want it to 
  668.         change HOPE to HOPEFUL, then you'd enter :
  669.  
  670.                 DR D:\FILES\HOPE HOPEFUL
  671.  
  672.         (The new path will be "D:\FILES\HOPEFUL")
  673.  
  674.  
  675.         In this fashion, we can rename a directory, which is NOT on the 
  676.         current drive.
  677.  
  678.         If you register Pro Power Tips, these utilities WILL be included 
  679.         with the utility disk we send!
  680.  
  681.  
  682.         Section finished. Be sure to order your THREE BONUS DISKS which 
  683.         expand this software package with vital tools, updates and 
  684.         additional tutorial material for computer users! Send $24.95 to 
  685.         Scanlon Enterprises, Department TIP, 38354 17th St. E., 
  686.         Palmdale, CA 93550. Bonus disks shipped promptly! Modifications, 
  687.         custom program versions, Site and LAN licenses of this package 
  688.         for business or corporate use are possible, contact the author. 
  689.         This software is shareware - an honor system which means TRY 
  690.         BEFORE YOU BUY. Press escape key to return to menu. 
  691.  
  692.  
  693.  
  694.